/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.system;

import com.enation.app.javashop.client.system.CaptchaClient;
import com.enation.app.javashop.core.client.fallback.system.CaptchaClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 验证码客户端
 *
 * @author zh
 * @version v7.0
 * @date 18/7/27 上午11:48
 * @since v7.0
 */
@FeignClient(name = "system-service", fallbackFactory = CaptchaClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface CaptchaClientFeignImpl extends CaptchaClient {
    /**
     * 图片验证
     *
     * @param uuid  uid
     * @param code  验证码
     * @param scene 业务类型
     * @return
     */
    @Override
    @RequestMapping(value = "/client/captcha", method = RequestMethod.GET)
    boolean valid(@RequestParam("uuid") String uuid, @RequestParam("code") String code, @RequestParam("scene") String scene);

    /**
     * 清除图片验证码
     *
     * @param uuid
     * @param code
     * @param scene
     */
    @Override
    @RequestMapping(value = "/client/captcha/del", method = RequestMethod.GET)
    void deleteCode(@RequestParam("uuid") String uuid, @RequestParam("code") String code, @RequestParam("scene") String scene);
}
